export default ()=>{
    let a:any = 1;
    a=''
    let b:string = '2';
    let c:boolean = true;
    let unde:undefined = undefined;
    let viod:void = undefined;

    const fun=():string=>{
        return '';
    }

    const fun2=():void=>{
        return 
    }

    const fun3=()=>{
        return false
    }

    let a4:number | string | boolean = 1;


    enum PayState2 {
        //成功的状态
        SUCCSESS="success",
        /**
         * 失败的状态
         */
        ERROR='error'
    }

//   console.log(PayState.SUCCSESS)
//type声名类型
type PayState = 'success' | 'error'
 

const f4=(state?:PayState,num?:number)=>{
    return state
}

f4(PayState2.ERROR)

interface Obj{
    name:string,
    age?:number
}

const f5=(obj:Obj)=>{

}

f5({name:'1'})

const f6=(info:Obj[])=>{
    info.forEach(item=>{
        item.name
    }
    )
}

f6([{name:'1'}])

interface Props{
    name:string,
    Hello:(name:Obj)=>void
}

const f7=(props:Props)=>{
    props.Hello({name:'1'})
    props.name
}



}